${response.setHeader("Cache-Control", "no-cache")}
${response.setHeader("Pragma", "no-cache")}
${response.setDateHeader("Expires", 0)}

<#assign display=JspTaglibs["http://displaytag.sf.net/el"]>
<#assign ajax=JspTaglibs["http://ajaxtags.sourceforge.net/tags/ajaxtags"]>

<#setting number_format="#.##"/>
<#setting boolean_format="true, false">
<#setting time_format=i18n.getMessage('format.time')>
<#setting date_format=i18n.getMessage('format.date')>
<#setting datetime_format=i18n.getMessage('format.datetime')>

<#macro showTitle title>
	<div class="title">
		<div class="icon"></div>
		<div class="function"><a></a><#nested/></div>
		<h1>${title}</h1>
	</div>
</#macro>

<#macro required>
	<span style="color:#F00">*</span>
</#macro>

<#macro showWhen roles=[]>
	<#assign shown = false>
	
	<#list roles! as roleName>
		<#list UserService.findById(user.id).roles! as role>
			<#if role.name == roleName>
				<#assign shown = true>
			</#if>
		</#list>
	</#list>
	
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenUser users=[]>
	<#assign shown = false>
	
	<#list users! as userName>
		<#if user.username == userName>
			<#assign shown = true>
		</#if>
	</#list>
	
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenChildren offering>
	<#assign shown = false>
	<#if offering.level.program.programType = "CHILDREN">
		<#assign shown = true>
	</#if>
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenTeenager offering>
	<#assign shown = false>
	<#if offering.level.program.programType = "TEENAGER">
		<#assign shown = true>
	</#if>
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenGE offering>
	<#assign shown = false>
	<#if offering.level.program.programType = "GE">
		<#assign shown = true>
	</#if>
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenOther offering>
	<#assign shown = true>
	<#if offering.level.program.programType = "GE">
		<#assign shown = false>
	</#if>
	<#if offering.level.program.programType = "CHILDREN">
		<#assign shown = false>
	</#if>
	<#if offering.level.program.programType = "TEENAGER">
		<#assign shown = false>
	</#if>
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro showWhenParamVisible param>
	<#assign shown = false>
	<#if param.visible == true>
		<#assign shown = true>
	</#if>
	<#if shown>
		<#nested>
	</#if>
</#macro>

<#macro formatOnConsultant consultant>
	<#if !consultant.active>
		text-decoration:line-through
	</#if>
</#macro>

<#macro formatOnScholarship scholarship>
	<#if !scholarship.active>
		text-decoration: line-through
	</#if>
</#macro>